<@sys.config code=code><#assign a=object/></@sys.config>
<@sys.configData code=code><#assign attribute=object/></@sys.configData>
<@sys.authorized roleIds=admin.roles urls='sysConfigData/delete,sysConfigData/save,sysConfig/add'><#assign authorizedMap=map/></@sys.authorized>
<form method="post" autocomplete="off" action="sysConfigData/save?callbackType=closeCurrent&navTabId=sysConfigData/list" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
    <input name="id.code" type="hidden" value="${code!}"/>
    <input type="hidden" name="_csrf" value="<@tools.csrfToken admin=true/>"/>
    <div class="formBar card">
        <ul>
        <#if authorizedMap['sysConfig/add']>
            <li><a class="button" href="sysConfig/add.html?code=${code}" target="navTab" rel="sysConfig/edit"><i class="icon-edit icon-large"></i><@t.page 'config.edit'/></a></li>
        </#if>
        <#if authorizedMap['sysConfigData/delete']>
            <li><a class="button" href="sysConfigData/delete?code=${code}&navTabId=sysConfigData/edit&_csrf=<@tools.csrfToken admin=true/>" title="<@t.page 'confirm.clear_config'/>" target="ajaxTodo"><@t.page 'button.clear_config'/></a></li>
        </#if>
        <#if authorizedMap['sysConfigData/save']>
            <li><button type="submit" class="buttonActive" title="ctrl+s" lock-url="common/lock?itemType=config&itemId=${code!}" close-url="common/unlock?itemType=config&itemId=${code!}"><@t.page 'button.save'/></button></li>
        </#if>
            <li><button type="button" class="button close"><@t.page 'button.close'/></button></li>
        </ul>
    </div>
    <div class="card">
        <div class="pageFormContent" layoutH>
            <dl class="nowrap">
                <dt><@t.page 'description'/>:</dt>
                <dd>
                    ${(a.description)!}
                </dd>
            </dl>
    <#include "../include_page/extendData.html"/>
    <@sys.configFieldList code=code>
        <@extendData name='extendDataList' extendList=list extendValues=attribute htmlSafe=true historyItemType='configData' historyItemId=code/>
    </@sys.configFieldList>
        </div>
    </div>
</form>